import request from '@/utils/request'

// 查询住院结账主表列表 (分页)
export function selectPageInpAcctMaster(query) {
    return request({
        url: '/business/inpAcctMaster/selectPage',
        method: 'get',
        params: query
    })
}

// 查询住院结账主表列表 (不分页)
export function listInpAcctMaster(query) {
    return request({
        url: '/business/inpAcctMaster/list',
        method: 'get',
        params: query
    })
}

// 查询住院结账主表详细
export function getInpAcctMaster(inpAcctMasterId) {
    return request({
        url: '/business/inpAcctMaster/' + inpAcctMasterId,
        method: 'get'
    })
}

// 新增住院结账主表
export function addInpAcctMaster(data) {
    return request({
        url: '/business/inpAcctMaster',
        method: 'post',
        data: data
    })
}

// 修改住院结账主表
export function updateInpAcctMaster(data) {
    return request({
        url: '/business/inpAcctMaster',
        method: 'put',
        data: data
    })
}

// 删除住院结账主表
export function delInpAcctMaster(inpAcctMasterId) {
    return request({
        url: '/business/inpAcctMaster/' + inpAcctMasterId,
        method: 'delete'
    })
}


// 出院结账确认
export function confirmTheAccount(query) {
    return request({
        url: "/business/inpAcctMaster/confirmTheAccount",
        method: "get",
        params: query,
    });
}

// 获取最后一次住院/预交金结账结束时间
export function getLastAcctEndDate(query) {
    return request({
        url: "/business/inpAcctMaster/getLastAcctEndDate",
        method: "get",
        params: query,
    });
}

// 获取住院结账支付金额明细和会计科目
export function getAcctDetailAndMoney(query) {
    return request({
        url: "/business/inpAcctMaster/getAcctDetailAndMoney",
        method: "get",
        params: query,
    });
}
